package com.vip.jwt.model.wx;

import com.vip.jwt.common.entity.R;
import com.vip.jwt.common.utils.xcx.wx.WXAuthUtil;
import com.vip.jwt.common.utils.xcx.wx.WXUserInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/wx/info")
public class WxInfoTemplateController {

    @RequestMapping("sendInfo")
    public Object sendInfo(){
        String accessToken = WXAuthUtil.getAccessToken();
        Map<String, Object> map = new HashMap<>();
        Map<String,Object> data = new HashMap<>();
        data.put("value",111);
        data.put("color","#22475");
        map.put("data",data);
        WXAuthUtil.sendTemplateMessage(accessToken,"rOcqC5Sv5MuhErBtK9KL4LBQ2Vwi1VQ-SUABCnqZwjA","om2-26CCeA6_ma_N-wKweaCyp89s",map);
        return R.ok();
    }
    @RequestMapping("getWxUserInfo")
    public void getWxUserInfo(){
    }
}
